package com.tm.chargecar.exception;

import com.tm.chargecar.enums.ResultEnum;
import lombok.Data;

@Data
public class BizException extends RuntimeException {

    private Integer code;
    private String msg;

    public BizException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public BizException() {
    }

    public BizException(ResultEnum resultEnum) {
        this.code = resultEnum.getCode();
        this.msg = resultEnum.getMsg();
    }

}
